@echo off

if not "x%1" == "x" goto chk_vc_version
echo Usage: win_rt_env ^<2008^> [debug/rel]
goto end

:chk_vc_version
REM if not "x%1" == "x2005" goto chk_vc2008
REM set vc_ver=vc2005
REM echo VC2005 picked ...
REM goto debug_or_rel

:chk_vc2008
if not "x%1" == "x2008" goto chk_vc_fail
set vc_ver=vc2008
echo VC2008 picked ...
goto debug_or_rel

:chk_vc_fail
echo No matching Visual C++ version
goto end

:debug_or_rel
set curdir=%~dp0

if not "x%2" == "xdebug" goto release_dll
set PATH=%curdir%extlib\openssl\win32\%vc_ver%\bin\debug;%curdir%extlib\zlib\win32\%vc_ver%\bin\debug;%PATH%
echo Debug env initialized.
goto end

:release_dll
set PATH=%curdir%extlib\openssl\win32\%vc_ver%\bin\rel;%curdir%extlib\zlib\win32\%vc_ver%\bin\rel;%PATH%
echo Production env initialized.

:end



